package com.example.docmanagement.dto.request;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;

/**
 * 创建用户请求体
 */
@Data
@Schema(description = "创建用户请求")
public class UserCreateRequest {

    @NotBlank
    @Email
    @Schema(description = "邮箱", example = "admin@example.com")
    private String email;

    @NotBlank
    @Size(min = 3, max = 50)
    @Schema(description = "用户名", example = "admin")
    private String username;

    @NotBlank
    @Size(min = 6, max = 64)
    @Schema(description = "初始密码", example = "P@ssw0rd")
    private String password;

    @Schema(description = "用户姓名", example = "管理员")
    private String fullName;

    @Schema(description = "手机号", example = "13800138000")
    private String phone;

    @Schema(description = "头像地址")
    private String avatarUrl;

    @Schema(description = "个人简介")
    private String bio;

    @NotNull
    @Schema(description = "角色ID", example = "1")
    private Long roleId;

    @Schema(description = "用户状态", allowableValues = {"active", "inactive", "banned"}, defaultValue = "active")
    private String status = "active";

    @Schema(description = "邮箱是否已验证", defaultValue = "false")
    private Boolean emailVerified = false;
}


